#ifndef __MARS_GRAPHICS_RASTERIZER_STATE_H__
#define __MARS_GRAPHICS_RASTERIZER_STATE_H__

#include "MarsObject.h"

namespace Graphics
{

class RasterizerState : public Core::Object
{
public:
									RasterizerState( const D3D11_RASTERIZER_DESC& rasterizerDesc );
									~RasterizerState();

	bool							Create();
	void							Delete();

	ID3D11RasterizerState*			GetNativeRasterizerState() const;

private:
	D3D11_RASTERIZER_DESC			m_rasterizerDesc;
	ID3D11RasterizerState*			m_pRasterizerState;
};

inline RasterizerState::RasterizerState( const D3D11_RASTERIZER_DESC& rasterizerDesc )
	: m_pRasterizerState( NULL )
{
	MARS_MEMCPY( &m_rasterizerDesc, &rasterizerDesc, sizeof( D3D11_RASTERIZER_DESC ) );
}

inline RasterizerState::~RasterizerState()
{
	Delete();
}

inline ID3D11RasterizerState* RasterizerState::GetNativeRasterizerState() const
{
	return m_pRasterizerState;
}

} // end of namespace Graphics

#endif // end of #ifndef __MARS_GRAPHICS_RASTERIZER_STATE_H__